﻿<!DOCTYPE html>
<html lang="zh-CN" style="height: auto;">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>爬虫结果列表</title>
        <link href="/static/test_shijue/bootstrap.css" rel="stylesheet">
        <link href="/static/test_shijue/AdminLTE.min.css" rel="stylesheet">
        <link href="/static/test_shijue/skin-blue.min.css" rel="stylesheet">
        <script src="/static/test_shijue/jquery.js"></script>    
    </head>
    <body class="skin-blue sidebar-mini sidebar-collapse" style="height: auto;">
        <div class="wrapper" style="height: auto;">

        
        <div class="content-wrapper" style="min-height: 570px;">
            <section class="content-header">
                <h1>爬虫结果列表</h1>
                <ul class="breadcrumb"><li><a href="#">首页</a></li><li class="active">爬虫结果列表</li></ul>
            </section>

            <section class="content">
                <style type="text/css">
                    .top-span {border: 1px solid #eee; height:170px; display: table-cell; vertical-align: bottom; width: 200px; text-align: center;}
                    .bottom-span {border: 1px solid #eee; height:170px;}
                    .li-margin {margin-bottom: 20px !important;margin-right: 20px !important; }
                    .ih-item{ position: relative;} 

                    .ih-item .img img{position: relative;max-width: 100%;} 
                    .ih-item .info {
                        position: absolute;
                        top: 0;
                        bottom: 0;
                        left: 0;
                        right: 0;
                        text-align: center;
                        -webkit-backface-visibility: hidden;/* 隐藏旋转元素的背面*/
                        backface-visibility: hidden;
                        background: rgba(68, 68, 68, 0.6);   /*后面这个0.6是指的背景的透明度*/
                        opacity: 0;
                        -webkit-transition: all 0.35s ease-in-out;   /*规定提示信息怎样出现ease-in-out以慢速度开始和结束*/
                        -moz-transition: all 0.35s ease-in-out;
                        transition: all 0.35s ease-in-out;
                        z-index: 10;
                    }
                    .no-opacity {opacity: 0 !important; }
                    .have-opacity{opacity: 0.8 !important; }
                </style>
<div class="row">
    <div class="col-xs-12">
        <div class="box box-warning">
            <div class="box-header with-border">
                <h3 class="box-title">筛选项</h3>
            </div>
            <form class="form-horizontal" id="searchform" action="Auto_task" method="get">
                <div class="box-body">
                    <div class="col-sm-12">
                        <!--
                        <div class="form-group col-sm-3">
                            <label for="company_id" class="col-sm-3 control-label">客户ID</label>
                            <div class="col-sm-9">
                                <input type="text" class="form-control" name="company_id" placeholder="客户ID" value="<?php echo isset($map['company_id']) ? $map['company_id'] : '';?>" autocomplete="off">
                            </div>
                        </div>
                        <div class="form-group col-sm-3">
                            <label for="task_id" class="col-sm-3 control-label">任务ID</label>
                            <div class="col-sm-9">
                                <input type="text" class="form-control" name="task_id" placeholder="任务ID" value="<?php echo isset($map['task_id']) ? $map['task_id'] : '';?>" autocomplete="off">
                            </div>
                        </div>-->
                        <div class="form-group col-sm-3">
                            <label for="clue_id" class="col-sm-3 control-label">子任务ID</label>
                            <div class="col-sm-9">
                                <input type="text" class="form-control" name="clue_id" placeholder="子任务ID" value="<?php echo isset($map['clue_id']) ? $map['clue_id'] : '';?>" autocomplete="off">
                            </div>
                        </div>
                        <div class="form-group col-sm-3">
                            <label for="clue_id" class="col-sm-3 control-label">排  序</label>
                            <div class="col-sm-9">
                                <select name="sort" id="" class="form-control" style="width: 80px;">
                                    <option value="1" <?php echo ($map['sort'] == 1 || empty($map['sort'])) ? 'selected' : '';?>>正序</option>
                                    <option value="-1" <?php echo $map['sort'] == -1 ? 'selected' : '';?>>倒序</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group col-sm-4">
                            <label for="search" class="col-sm-3 control-label"></label>
                            <div class="col-sm-10 form-inline">
                                <button type="submit" class="form-control btn btn-success">搜索</button>
                                <button type="reset" class="form-control btn btn-warning">重置</button>
                                <button  id="sub_ids" type="button" class="form-control btn btn-info">提交</button>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
        <div class="col-xs-12">
        <div class="box box-solid">
            <div class="box-header">
                <div class="pull-left">
                    <div class="btn-group"><span class="btn btn-success btn-sm">共<?php echo $count;?>条</span></div>
                    <div class="btn-group" id="del_ids"><span class="btn btn-danger btn-sm">删除</span></div>
                    <div class="btn-group" id="roll_ids"><span class="btn btn-warning btn-sm">回滚</span></div>
                    <div class="btn-group" id="check_ids"><span class="btn btn-info btn-sm">全选</span></div>
                </div>
            </div>
            <div class="box-body">
                <form id="my_ids">
                    <input type="hidden" name="clue_id" value="<?=$map['clue_id'] ?>">
                    <ul class="mailbox-attachments clearfix">
                        <?php foreach ($lists as $key => $value) { ?>
                            <li class="li-margin li-class" id="spider_16">
                                <div class="ih-item">
                            <span class="mailbox-attachment-icon has-img top-span" style="background: #f4f4f4;">
                                <a href="<?php echo $value['url'];?>" target="_blank">
                                    <img style="max-width:170px;max-height:168px;" src="<?php echo $value['img_url'];?>" alt="">
                                </a>
                            </span>
                                    <label for="my_<?php echo $value['_id'];?>" style="width: 100%">
                                        <div class="mailbox-attachment-info">
                                            <div class="box box-solid collapsed-box" style="margin-bottom: 10px;">
                                                <div class="box-header with-border" for="my_<?php echo $value['_id'];?>">

                                                    <?php if ($value['status'] == 0):?><span style="color: red;">已删除</span><?php endif;?>
                                                    <?php if ($value['status'] == 1):?><span style="color: orange;">待提交</span><?php endif;?>
                                                    <?php if ($value['status'] == 2):?><span style="color: green;">已提交</span><?php endif;?>
                                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                    <h4 class="box-title" style="font-size: 13px;">
                                                        <?php echo $value['width'];?> * <?php echo $value['height'];?>
                                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                    </h4>
                                                    <?php if($value['status'] == 1 && ($value['width'] < 100 || $value['height'] < 100)){?>
                                                    <input type="checkbox" id="my_<?php echo $value['_id'];?>" name="vehicle[]" value="<?php echo $value['_id'];?>" checked="checked" />
                                                    <?php }else{?>
                                                    <input type="checkbox" id="my_<?php echo $value['_id'];?>" name="vehicle[]" value="<?php echo $value['_id'];?>" />
                                                    <?php }?>
                                                </div>
                                            </div>
                                        </div>
                                    </label>
                                </div>
                            </li>
                        <?php }?>
                    </ul>
                </form>
            </div>
            <div class="box-footer">
                <div class="pull-left">
                    <div style ="padding-left: 50px;"class = "pagination" ><?php echo $this->pagination->create_links();?></div>
                </div>
            </div>
        </div>
    </div>
    </div>
<script type="text/javascript">
$('button:reset').click(function(){
        window.location.href='?'; 
});

$("#sub_ids").click(function () {
    var param = $("#my_ids").serialize();
    $.ajax({
        url:"<?=site_url().'/auto_task/submit' ?>",
        type:"post",
        data:param,
        dataType:"json",
        success:function (data) {
            window.location.reload();
        },
        error:function (data) {

        }
    })
})
$("#del_ids").click(function () {
    var param = $("#my_ids").serialize();
    $.ajax({
        url:"<?=site_url().'/auto_task/delete' ?>",
        type:"post",
        data:param,
        dataType:"json",
        success:function (data) {
            window.location.reload();
        },
        error:function (data) {

        }
    })
})
$("#roll_ids").click(function () {
    var param = $("#my_ids").serialize();
    $.ajax({
        url:"<?=site_url().'/auto_task/rollback' ?>",
        type:"post",
        data:param,
        dataType:"json",
        success:function (data) {
            window.location.reload();
        },
        error:function (data) {

        }
    })
})
$("#check_ids").click(function () {
    $(':checkbox').prop('checked',true);
})
</script>
</section>
</div>

<footer class="main-footer">
    <div class="pull-right hidden-xs">
        <b>版本</b> 1.0
    </div>
    <strong>Copyright © 2016-2018&nbsp;&nbsp;<a href="#">氢元数据</a>.</strong>
</footer>
 
</body>
</html>